/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-06 17:18:37
 * @LastEditTime: 2021-12-06 17:36:29
 * @LastEditors: 赵大壮
 */
import DZServiceCompany from "@/views/公司管理/service/DZServiceCompany";
import DZServiceStaff from "@/views/员工管理/service/DZServiceStaff";
import { Component, Vue, Inject } from "vue-property-decorator";
import DZServiceReport from "../service/DZServiceReport";

@Component({
    components: {}
})
export default class Index extends Vue {

    s_staff = new DZServiceStaff();

    s_report = new DZServiceReport();

    created() { }

    mounted() {
        this.s_report.net_list_all_company();
        this.s_report.net_list_report();
    }

    beforeDestroy() {

    }

    action_choise_company() {
        this.s_staff.list_staff = [];
        this.s_report.list_assess = [];
        this.s_report.assess_id = null;
        this.s_report.staff_id = null;
        if (this.s_report.company_id != '') {
            this.s_staff.company = this.s_report.company_id;
            this.s_staff.net_list_staff();
            this.s_report.net_list_assess_by_company();
        }
        this.s_report.net_list_report();
    }

    action_download_report(item) {
        this.s_report.net_down_load(item.path)
    }

    action_page_change(cur_page){
        this.s_report.m_page.page = cur_page;
        this.s_report.net_list_report();
    }

    action_list_report(){
        this.s_report.net_list_report();
    }

    action_export_report(){
        this.s_report.net_export_report();
    }
}